Skip to content

Add RDoc logo to documentation#1734

Merged
st0012 merged 1 commit into
ruby:masterfrom
st0012:codex/add-rdoc-logo
Jun 21, 2026
Merged

Add RDoc logo to documentation#1734
st0012 merged 1 commit into
ruby:masterfrom
st0012:codex/add-rdoc-logo

Conversation

@st0012

@st0012 st0012 commented Jun 16, 2026

Copy link
Copy Markdown
Member

On official website:

Screenshot 2026-06-16 at 17 54 31 Screenshot 2026-06-16 at 17 54 28

On GitHub:

Screenshot 2026-06-16 at 17 55 29

@st0012 st0012 temporarily deployed to fork-preview-protection June 16, 2026 16:51 — with GitHub Actions Inactive
@matzbot

matzbot commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

🚀 Preview deployment available at: https://d250f31f.rdoc-6cd.pages.dev (commit: 0011d0a)

@st0012 st0012 marked this pull request as ready for review June 16, 2026 16:56
Copilot AI review requested due to automatic review settings June 16, 2026 16:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Not ready to approve

The new README image reference will produce a broken image when users generate docs via the plain rdoc command unless .rdoc_options (or equivalent CLI guidance) is updated to copy the asset too.

Pull request overview

This PR adds an RDoc logo asset and wires it into both the repository README and generated Aliki-theme documentation output, ensuring the image is packaged with the gem and copied into generated site output.

Changes:

  • Add rdoc-logo.svg and reference it from README.md.
  • Ensure the SVG is included in gem packaging and copied during RDoc generation (rdoc.gemspec, Rakefile).
  • Add Aliki CSS rules to style the logo block in generated HTML.
File summaries
File Description
README.md Adds a centered logo image at the top of the README.
rdoc.gemspec Packages the SVG and adds --copy-files rdoc-logo.svg to gem RDoc generation options.
rdoc-logo.svg Introduces the new logo asset as an SVG.
Rakefile Adds --copy-files rdoc-logo.svg to the rake rdoc task options so site builds include the asset.
lib/rdoc/generator/template/aliki/css/rdoc.css Styles the logo block for the generated docs (including a dark-theme variant).

Copilot's findings

  • Files reviewed: 4/5 changed files
  • Comments generated: 1

Note

Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Comment thread rdoc-logo.svg

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally this should be under doc/. But moving it there would cause file path mismatch in generated doc (copied file is always placed on _site/, so source will still be rdoc-logo.svg) and GH (will use doc/rdoc-logo.svg). So I'll leave that to another discussion/PR.

@kou kou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Comment thread Rakefile
RDoc::Task.new do |doc|
# RDoc task defaults to /html and overrides the op_dir option in .rdoc_options
doc.rdoc_dir = "_site" # for GitHub Pages
doc.options << "--copy-files" << "rdoc-logo.svg"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use .rdoc_options instead?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .rdoc_options equivalent to this option is static_path. But in there paths don't get expanded "before" entering _site. So it means that it'd try to copy the svg from _site, which ofc doesn't exist there.
Using ../rdoc-logo.svg also fails because it gets rejected directly. I think this is a bug that needs to be fixed separately.

@st0012 st0012 merged commit 7daa431 into ruby:master Jun 21, 2026
29 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants